package com.letfox.user.service.relation.impl;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.letfox.user.dao.relation.UserContactDao;
import com.letfox.user.model.relation.UUserContact;
import com.letfox.user.service.relation.UserContactService;

@Service
public class UserContactServiceImpl implements UserContactService {

	@Autowired
	private UserContactDao userContactDao;
	
	@Override
	public int save(UUserContact userContact) {
		return userContactDao.insert(userContact);
	}

	@Override
	public int update(UUserContact entity) {
		return userContactDao.update(entity);
	}

	@Override
	public int deleteById(Long id) {
		return userContactDao.deleteById(id);
	}

	@Override
	public int deleteByIds(String ids) {
		return userContactDao.deleteByIds(ids);
	}

	@Override
	public UUserContact getById(Long id) {
		return userContactDao.selectById(id);
	}

	@Override
	public List<UUserContact> getList(UUserContact entity) {
		return userContactDao.selectList(entity);
	}

	@Override
	public List<UUserContact> getList(Map<String, Object> params) {
		return userContactDao.selectList(params);
	}

}
